<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LINE 1 &quot;libraries\\Win32\\Graphics\\Win32\\Window\\IMM.hsc&quot; #-}</span><span>
</span><span id="line-1"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">{- |
   Module      :  Graphics.Win32.Window.IMM
   Copyright   :  2013 shelarcy
   License     :  BSD-style

   Maintainer  :  shelarcy@gmail.com
   Stability   :  Provisional
   Portability :  Non-portable (Win32 API)

   An FFI binding to the IMM (Input Method Manager) part of the Win32 API.
-}</span><span>
</span><span id="line-13"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Graphics.Win32.Window.IMM</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Foreign.Marshal.Alloc</span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">alloca</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Foreign.Marshal.Utils</span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">fromBool</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Foreign.Ptr</span><span>              </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Foreign.Storable</span><span>         </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">peek</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.GDI.Types</span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Graphics.Win32.Key</span><span>       </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">VKey</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">System.Win32.Types</span><span>       </span><span class="hs-special">(</span><span> </span><span class="hs-identifier">UINT</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">DWORD</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">LPDWORD</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">BOOL</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">)</span><span class="hs-cpp">


#include &quot;windows_cconv.h&quot;
</span><span>
</span><span id="line-25"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmGetContext&quot;</span><span>
</span><span id="line-28"></span><span>  </span><span class="hs-identifier">immGetContext</span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">HIMC</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmGetOpenStatus&quot;</span><span>
</span><span id="line-31"></span><span>  </span><span class="hs-identifier">immGetOpenStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-identifier">immSetOpenStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">BOOL</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-identifier">immSetOpenStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-identifier">flg</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;ImmSetOpenStatus&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">imc</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">flg</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_ImmSetOpenStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">fromBool</span><span> </span><span class="hs-identifier">flg</span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmSetOpenStatus&quot;</span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-identifier">c_ImmSetOpenStatus</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">UINT</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">IMEMode</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">IMEMode</span><span> </span><span class="hs-identifier">DWORD</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-identifier">immGetConversionStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">IMEMode</span><span>
</span><span id="line-45"></span><span class="hs-identifier">immGetConversionStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-identifier">alloca</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span class="hs-identifier">lpConv</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-identifier">alloca</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-glyph">\</span><span class="hs-identifier">lpStnc</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;ImmGetConversionStatus&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">imc</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">lpConv</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">lpStnc</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-operator">$</span><span>
</span><span id="line-49"></span><span>      </span><span class="hs-identifier">c_ImmGetConversionStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-identifier">lpConv</span><span> </span><span class="hs-identifier">lpStnc</span><span>
</span><span id="line-50"></span><span>    </span><span class="hs-identifier">conv</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">peek</span><span> </span><span class="hs-identifier">lpConv</span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-identifier">stnc</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">peek</span><span> </span><span class="hs-identifier">lpStnc</span><span>
</span><span id="line-52"></span><span>    </span><span class="hs-identifier">return</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">IMEMode</span><span> </span><span class="hs-identifier">conv</span><span> </span><span class="hs-identifier">stnc</span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmGetConversionStatus&quot;</span><span>
</span><span id="line-55"></span><span>  </span><span class="hs-identifier">c_ImmGetConversionStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">LPDWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-identifier">LPDWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-identifier">immSetConversionStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IMEMode</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-identifier">immSetConversionStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">IMEMode</span><span> </span><span class="hs-identifier">conv</span><span> </span><span class="hs-identifier">stnc</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;ImmSetConversionStatus&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">imc</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">conv</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">stnc</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_ImmSetConversionStatus</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-identifier">conv</span><span> </span><span class="hs-identifier">stnc</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmSetConversionStatus&quot;</span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-identifier">c_ImmSetConversionStatus</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">DWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">DWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- iMN_SETCONVERSIONSTATUS = #const IMN_SETCONVERSIONSTATUS</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-identifier">iME_CMODE_ALPHANUMERIC</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-68"></span><span class="hs-identifier">iME_CMODE_ALPHANUMERIC</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-69"></span><span class="hs-identifier">iME_CMODE_CHARCODE</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-70"></span><span class="hs-identifier">iME_CMODE_CHARCODE</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">32</span><span>
</span><span id="line-71"></span><span class="hs-identifier">iME_CMODE_EUDC</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-72"></span><span class="hs-identifier">iME_CMODE_EUDC</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">512</span><span>
</span><span id="line-73"></span><span class="hs-identifier">iME_CMODE_FIXED</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-74"></span><span class="hs-identifier">iME_CMODE_FIXED</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2048</span><span>
</span><span id="line-75"></span><span class="hs-identifier">iME_CMODE_FULLSHAPE</span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-76"></span><span class="hs-identifier">iME_CMODE_FULLSHAPE</span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-77"></span><span class="hs-identifier">iME_CMODE_HANJACONVERT</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-78"></span><span class="hs-identifier">iME_CMODE_HANJACONVERT</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">64</span><span>
</span><span id="line-79"></span><span class="hs-identifier">iME_CMODE_KATAKANA</span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-80"></span><span class="hs-identifier">iME_CMODE_KATAKANA</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-81"></span><span class="hs-identifier">iME_CMODE_NATIVE</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-82"></span><span class="hs-identifier">iME_CMODE_NATIVE</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-83"></span><span class="hs-identifier">iME_CMODE_NOCONVERSION</span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-84"></span><span class="hs-identifier">iME_CMODE_NOCONVERSION</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">256</span><span>
</span><span id="line-85"></span><span class="hs-identifier">iME_CMODE_ROMAN</span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-86"></span><span class="hs-identifier">iME_CMODE_ROMAN</span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">16</span><span>
</span><span id="line-87"></span><span class="hs-identifier">iME_CMODE_SOFTKBD</span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-88"></span><span class="hs-identifier">iME_CMODE_SOFTKBD</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">128</span><span>
</span><span id="line-89"></span><span class="hs-identifier">iME_CMODE_SYMBOL</span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-90"></span><span class="hs-identifier">iME_CMODE_SYMBOL</span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1024</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-pragma">{-# LINE 81 &quot;libraries\\Win32\\Graphics\\Win32\\Window\\IMM.hsc&quot; #-}</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-identifier">iME_SMODE_AUTOMATIC</span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-83"></span><span class="hs-identifier">iME_SMODE_AUTOMATIC</span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">4</span><span>
</span><span id="line-84"></span><span class="hs-identifier">iME_SMODE_NONE</span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-85"></span><span class="hs-identifier">iME_SMODE_NONE</span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">0</span><span>
</span><span id="line-86"></span><span class="hs-identifier">iME_SMODE_PHRASEPREDICT</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-87"></span><span class="hs-identifier">iME_SMODE_PHRASEPREDICT</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">8</span><span>
</span><span id="line-88"></span><span class="hs-identifier">iME_SMODE_PLAURALCLAUSE</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-89"></span><span class="hs-identifier">iME_SMODE_PLAURALCLAUSE</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">1</span><span>
</span><span id="line-90"></span><span class="hs-identifier">iME_SMODE_SINGLECONVERT</span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">DWORD</span><span>
</span><span id="line-91"></span><span class="hs-identifier">iME_SMODE_SINGLECONVERT</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-number">2</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-pragma">{-# LINE 89 &quot;libraries\\Win32\\Graphics\\Win32\\Window\\IMM.hsc&quot; #-}</span><span>
</span><span id="line-89"></span><span class="hs-comment">{-
 , iME_SMODE_CONVERSATION  = IME_SMODE_CONVERSATION
-}</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-identifier">immReleaseContext</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span class="hs-identifier">immReleaseContext</span><span> </span><span class="hs-identifier">wnd</span><span> </span><span class="hs-identifier">imc</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;ImmSetOpenStatus&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">wnd</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">imc</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_ImmReleaseContext</span><span> </span><span class="hs-identifier">wnd</span><span> </span><span class="hs-identifier">imc</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmReleaseContext&quot;</span><span>
</span><span id="line-99"></span><span>  </span><span class="hs-identifier">c_ImmReleaseContext</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">HIMC</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmGetVirtualKey&quot;</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-identifier">immGetVirtualKey</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">VKey</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-identifier">immSimulateHotKey</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">DWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span class="hs-identifier">immSimulateHotKey</span><span> </span><span class="hs-identifier">hwd</span><span> </span><span class="hs-identifier">hkey</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-identifier">failIfFalse_</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unwords</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;ImmSimulateHotKey&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">hwd</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">hkey</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>    </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">c_ImmSimulateHotKey</span><span> </span><span class="hs-identifier">hwd</span><span> </span><span class="hs-identifier">hkey</span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-string">&quot;windows.h ImmSimulateHotKey&quot;</span><span>
</span><span id="line-110"></span><span>  </span><span class="hs-identifier">c_ImmSimulateHotKey</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">HWND</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">DWORD</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">BOOL</span><span>
</span><span id="line-111"></span></pre></body></html>